<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<script src="../js/vue.js"></script>
<script src="../js/axios-0.18.0.js"></script>

<body>
    <div id="app">
        <h2>酒店网站</h2>
        <div v-for="obj in shuJu">
            {{obj.id}}
            {{obj.hotelName}}
            {{obj.address}}
            {{obj.details}}
            <br><br>
        </div>
    </div>
</body>
<script>
    new Vue({
        el: '#app',
        data: {
            shuJu: null
        }, mounted() {
            axios.get('http://localhost:8099/lieBiao?index=1')
                .then(response => (this.shuJu = response.data)
                ).catch(function (error) {
                    console.log(error);
                });
        },
    })
</script>

</html>